<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <style>
      .block {
        position: relative;
        width: 300px;
        height: 200px;
        border: 1px solid #000;
        margin: 50px auto;
        padding-top: 20px; /* 为标题留出空间 */
      }

      .block::after {
        content: '区域标题';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #fff;
        padding: 0 10px;
      }
    </style>
    <title>模拟区域标题</title>
  </head>
  <body>
    <div class="block">
      <p>这里是区块的内容。</p>
    </div>
  </body>
</html>
